<?php

/**
 * SearchForm class.
 * SearchtForm is the data structure for keeping
 * search form. It is used by the 'index' action of 'SearcbController'.
 */

class SearchForm extends CFormModel
{
	public $word;
	public $type;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			// word and type are required
			array('word', 'required', 'message'=>Yii::t('yii','Please type something to search for.')),
			array('type', 'required', 'message'=>Yii::t('yii','Please choose where to search.')),
		);
	}

}
